Software Reverse Engineering - CrackersConvert v1.0
Writing A Key Generator
Author: Volatility

Please Read The Disclaimer Before Continuing.


Target CrackersConvert v1.0 - (cconvert.zip) - 20,312 bytes
Location http://pages.prodigy.net/volatility/database/cconvert.zip
Protection(s) User Name/Serial Number
Tools Needed NuMega Smartcheck v5.0 (Or Newer)
Microsoft Visual Basic 5.0 (Any Version Will Work I Think)
Level ( ) Beginner (X) Intermediate ( ) Advanced ( ) Expert


Prepare To Crack:

Since I wrote this utility (which I hope you find useful!) and crackme, I decided I'd better figure out exactly how one would go about figuring out the calculation (without any unfair knowledge *g*) in order to write a key generator.

If you are reading this file, you've either given up at figuring out the calculation, don't have any idea how, and never will, or you just want to confirm your suspicions... I hope the latter case is true!

After you read this... you'll see exactly how simple this calculation is, and will probably slap yourself in the head a few times, or want to slap ME in the head a few times :)

If you have an older version of my program, please download the new one  Here, since the old one had an error in a timer which made using Smartcheck confusing.  Download the new version anyway, just to be safe.

Since the app is written in VB, and since VB is the only language I know real well (pathetic, I know!), we'll write the key generator in VB as well.

Making The Crack:

This essay ASSUMES that you have already cracked, and found your correct serial number using Soft-Ice, or some other method.  Knowing the correct serial number for your name is ESSENTIAL, and you must fish it before you can proceed in this essay.  Tutorials on doing this will be provided via me, or my website, once people start writing and contributing them.  If no one does, I'll write one myself.  The program MUST be in its unregistered state.  If you already have the program registered, you can unregister it by deleting a character in "cconvert.ccc".

For this essay, we'll use my user name and serial number.  You'll see how easy it is to apply your own after this lesson :)

Ok... so we've fished our correct serial number... we should now have the following information:

User Name: Volatility
Serial Number: REG-1720-CODE

Now that we have this info... let's fire up Smartcheck to see what we can find out.  Load the program into Smartcheck ("File", "Open" then choose cconvert.exe).  Press the "Run" button (button with the litte green arrow on it).  RIGHT AFTER pressing the run button, choose "View" then "Show All Events".  Now just let the Smartcheck do it's work, until you see the "Unregistered Version" message box pop up.  Press "OK", let Smartcheck work some more until the program is up.  Now click on the "About" button, then the "Register" button.  Enter in your user name (Volatility) and a serial number (272727).  Press the "Validate" button, click ok when the "Sorry, Better Luck Next Time" message box appears, and now we have all the info we'll need.

Choose "View", "Expand All" from the menu.  Now we need to find the spot where you pressed the "Validate" button.  The command is "cmdValidate_Click".  Once you find this, you'll see the following underneath it (only the relevant parts we'll need are shown here):
 
txtUserName.Text
Len(String:"Volatili...")returns LONG:10
txtUserName.Text
Mid(VARIANT:String"Volatili...", long:1, VARIANT:Integer:5)                                                               
Asc(String:"Volat") returns Integer:86
Str(VARIANT:Integer:86)

Now (in case you don't know Visual Basic, or any programming) here is what each line does:

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
txtUserName.Text
Get the user name you entered into the text box.

Len(String:"Volatili...")returns LONG:10
Get the length (LEN) of the user name you entered.  Volatility has 10 characters (returns LONG:10).

txtUserName.Text
Read your user name again.

Mid(VARIANT:String"Volatili...", long:1, VARIANT:Integer:5)
Use the Mid function to select a certain number of characters from the user name you entered -- we only know that we're selecting five characters (VARIANT:Integer:5) for now.

Asc(String:"Volat") returns Integer:86
Now we know that the previous function selected the FIRST FIVE characters of our user name, thus leaving us with "Volat".  Now, select the the FIRST character of this string, and convert it to ASCII.  (NOTE: The Asc function in VB takes the first character of a string, and converts it to ASCII).  The first character of our string is V, and the equivalent in ASCII is 86 (returns Integer:86).

Str(VARIANT:Integer:86)
The first character of our name is now converted to the number 86.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

To sum this entire process up, the routine gets our user name (Volatility), selects some characters (serves no purpose, other than to misguide crackers :)) from it, in this case the first five (Volat), uses the Asc function to convert the first character (V) to its ASCII equivalent (86).

Ok... this is all fine and dandy, but what the hell good does the number 86 do us?  It doesn't have anything in common with our serial number.... or does it?  Using a little bit of intuition, and a little bit of *Zen Cracking*, we decide to divide 86 into our serial number, 1720.  What we are left with is exactly the number 20 :)  That's it!  Our converted string (86) is simply multiplied by 20 to generate our serial number!

Now, to code the key generator.  You must first create a form with two text boxes (Text1 and Text2), and a command button.  Double click the command button, and enter the following code (lines are commented so you know what they do):
 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CrackersConvert v1.0 Key Generator by Volatility
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Dim RegString, RegConv, RegCode, RegMult                             'Set up some variables
    If Len(Text1.Text) > 4 Then                                      'Check if user name entered is at least 5 characters
        RegString = Text1.Text                                       'Variable RegString is now the user name entered
        RegConv = Mid(RegString, 1, 5)                               'Get the first five characters of user name = RegConv
        RegConv = Str(Asc(RegConv))                                  'Convert the first character to ASCII = RegConv
    Else                                                             'If user name isn't 5 characters long, then
        MsgBox ("User Name Must Be At Least Five Characters Long")   'Display Error Message
        GoTo Quit                                                    'Quit
    End If                                                           'End the function
    
        RegMult = RegConv * 20                                       'Multiply the new ASCII value by 20
    
        RegCode = "REG-" & RegMult & "-CODE"                         'add "REG-" and "-CODE" around the number
        Text2.Text = RegCode                                         'Display the serial number in Text2
    
Quit:

Hopefully, this essay gets you started in the right direction, on finding out how some registrations are calculated, as well as how to use this knowledge to write a key generator.  I'd highly doubt if you'll find another calculation as simple as mine!


*** Disclaimer ***
This Essay Is For Knowledge Purposes Only. Neither We, Our ISP, Nor Any Persons Mentioned Shall Be Held Liable For Any Damages Improper Usage May Cause To Your Machine.

If You Successfully Crack A Program, You Must Delete It Immediately. If You Want To Keep The Program, Please BUY It! Support Shareware, This Is Our Learning Tool!

It Is Illegal To Continue To Use Cracked/Patched Software.


Copyright © 1998 Volatility And The Immortal Descendants. All Rights Reserved.